//是否显示身份证输入
var isHasSfz = true;

var tagid = "message";
function showRedMsg(tagid,msg){
	//提示信息
	$(".form_tip_box span").text(msg);
	$(".form_tip_box").slideDown(500,function(){
		setTimeout(function (){
			$(".form_tip_box").slideUp(500);
		}, 1500);
	});

} 
function parseQueryString() {
	var url = window.location.href;
	var obj = {};
	var keyvalue = [];
	var key = "",
		value = "";
	var paraString = url.substring(url.indexOf("?") + 1, url.length).split("&");
	for(var i in paraString) {
		keyvalue = paraString[i].split("=");
		key = keyvalue[0];
		value = keyvalue[1];
		obj[key] = value;
	}
	return obj;
}

function clearMessage(){
	$("#"+tagid).html("");
}

var doMask = function() {
	$("body").append('<div class="yl_loading"  style="z-index: 9999;"><div><span></span></div></div>');
}

var unMask = function() { 
	$(".yl_loading").remove();
} 

// 禁止拖动事件
document.onselectstart=function(){return false;}  
document.ondragstart=function(){return false;} 

//打开上屏页面
function windowOpen(url){
	var config_ClientWindowTop = -1080;
	var config_ClientWindowLeft = 0;
	var config_ClientWindowWidth = 1920;
	var config_ClientWindowHeight = 1020;
	window.open (url,'sysWindow','top='+config_ClientWindowTop+', left='+config_ClientWindowLeft+',width='+config_ClientWindowWidth+',height='+config_ClientWindowHeight);
}
//用户下线
function offLine(){
	$.ajax({
        url:gover.cleanApply,
        data:{
        	userId:sessionStorage.getItem("userId"),
        	type:''
        },
        async:true,
        type:'get',
        dataType :'json',
        success : function(result) {
        },
        error : function(){
        }
    });
}
function cleanFace(){
	$.ajax({
        url:face.setFaceState,
        data:{
        	userId:sessionStorage.getItem("userId"),
        	type:3
        },
        async:true,
        type:'post',
        dataType :'json',
        success : function(result) {
        },
        error : function(){
        }
    });
}

function timeoutBack(){
	if(sessionStorage.getItem("userId")){
		offLine();
	}
	if(sessionStorage.getItem('isFace')){
		cleanFace();
	}
	window.setTimeout(function(){
		window.location="../../page/gover/index.html";
	},800);

}
